package entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="USERS")
@NamedQueries({
	@NamedQuery(name="Users.findAll", query="SELECT u FROM Users u"),
	@NamedQuery(name="Users.findByUsernameAndPassword", query="SELECT u FROM Users u WHERE u.username = :username AND u.password = :password")
})
public class Users implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="USR_ID")
	private Long id;
	@Column(name="USR_USERNAME", nullable=false, length=50, unique=true)
	private String username;
	@Column(name="USR_PASSWORD", nullable=false, length=32)
	private String password;
	@Column(name="USR_EMAIL", nullable=false, length=100, unique=true)
	private String email;
	@Column(name="USR_IS_ACTIVE", nullable=false)
	private Boolean isActive;
	
	public Users() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	
}
